<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap-theme.min.css')}}">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="{{asset('jquery.js')}}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{{asset('bootstrap/js/bootstrap.min.js')}}"></script>
</head>
<body>
<div style="height:100%;width:100%;position:fixed;z-index: -20">
    <img src="{{asset('img/bg1.jpg')}}" style="height:100%;width:100%;">
</div>
<div class="con-header">
    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <a href="javascript:;" class="navbar-brand">成都家政服务系统</a>
            </div>
        </div>
    </nav>
</div>
<div style="height:50px;"></div>
<div class="con-body">
    <div class="banner">
        @if(session('__Ajax_RedirectFunc_status') == true)
            <div>
                <div class="alert alert-success alert-dismissible fade in" role="alert">
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h3>成功</h3>
                    <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
                    <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
                </div>
            </div>
        @endif
        @if(session('__Ajax_RedirectFunc_status') === false)
            <div >
                <div class="alert alert-danger alert-dismissible fade in" role="alert">
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h3>失败</h3>
                    <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
                    <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
                </div>
            </div>
        @endif
        <div class="container">
            <div class="row">
                <div class="col-md-8 col-md-offset-2" style="height:740px;">
                    <body>
                    <div style="height:150px;"></div>
                    <p class="lead" style="font-size:65px;color:white;text-align:center;">成都家政服务系统</p>
                    <p class="lead" style="font-size:30px;color:white;text-align:center;">贴近本土 以人为本 优质服务 诚信为本</p>
                    <div class="col-sm-8 col-sm-offset-2">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <h2 style="text-align:center">注册</h2>
                                <hr/>
                                <form  method="post" action="/registers">
                                    <input type="hidden" name="_token" value="{{csrf_token()}}">
                                    <div class="form-group">
                                        <label>姓名</label>
                                        <input type="text" class="form-control" name="customer_name" placeholder="姓名" required autofocus>
                                    </div>
                                    <div class="form-group">
                                        <label>手机号</label>
                                        <input type="number" class="form-control" name="customer_phone" lay-verify="phone" placeholder="手机号" autocomplete="off" required autofocus >
                                    </div>
                                    <div class="form-group">
                                        <label>区域</label>
                                        <select class="form-control" name="customer_area">
                                            @foreach($area as $area_v)
                                            <option value="{{$area_v->area_id}}">{{$area_v->area_name}}</option>
                                            @endforeach
                                        </select>
                                        注：如没有您所在的区域，说明您的区域还没有开放。
                                    </div>
                                    <div class="form-group">
                                        <label>密码</label>
                                        <input type="password" class="form-control" name="customer_password" placeholder="密码" required autofocus>
                                    </div>
                                    <p class="text-center" id="Lg-dialog"></p>
                                    <button type="submit" class="btn btn-primary btn-block">注册</button>
                                    <a href="/index" class="btn btn-default btn-block">返回</a>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{{--内容部分结束--}}
<div class="con-footer">
    <div class="container-fluid">
        <div class="row">
            <div style="height:100px;"></div>
            <div class="col-md-8 col-md-offset-2">
                <p class="lead" style="color:black;text-align:center;">技术支持：未来科技有限公司</p>
                <p class="lead" style="color:black;text-align:center;">客服电话：123456        Email: XXXX@163.com</p>
            </div>
        </div>
    </div>
</div>

<script src="{{asset('layui/layui.js')}}" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form()
                ,layer = layui.layer
                ,layedit = layui.layedit
                ,laydate = layui.laydate;

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '标题至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });


    });
</script>

</body>
</html>

